﻿<classes>
  <class name="Invoice" assembly="TestCDefSolution.BO" table="tbInvoice" displayName="Invoice">
    <property name="InvoiceID" type="Guid" readWriteRule="WriteNew" databaseField="InvoiceIDDBColName" compulsory="true" displayName="Invoice ID Display Name" description="Prop Invoice ID Description" />
    <property name="InvoiceNo" type="Int32" autoIncrementing="true" description="Auto Invoice #" />
    <property name="InvoiceType">
      <simpleLookupList>
        <item display="Standard" value="std" />
        <item display="Complex" value="comp" />
      </simpleLookupList>
    </property>
    <primaryKey isObjectID="false">
      <prop name="InvoiceID" />
    </primaryKey>
    <relationship name="InvoiceItems" type="multiple" timeout="5000" relatedClass="InvoiceItem" reverseRelationship="Invoice" relatedAssembly="TestCDefSolution.BO" orderBy="InvoiceItemUk">
      <relatedProperty property="InvoiceID" relatedProperty="InvoiceID" />
    </relationship>
    <ui name="Invoice2">
      <grid>
        <column heading="InvoiceNo" property="InvoiceNo" editable="false" width="200" />
        <column heading="InvoiceType" property="InvoiceType" editable="false" width="200" />
      </grid>
      <form>
        <tab name="Invoice">
          <columnLayout width="250">
            <field label="InvoiceNo: *" property="InvoiceNo" layout="Label" />
            <field label="InvoiceType" property="InvoiceType" type="ComboBox" layout="Label" />
          </columnLayout>
        </tab>
        <tab name="default">
          <columnLayout width="250">
            <field label="InvoiceNo: *" property="InvoiceNo" layout="Label" />
            <field label="InvoiceType" property="InvoiceType" layout="Label" />
          </columnLayout>
        </tab>
      </form>
    </ui>
  </class>
  <class name="InvoiceItem" assembly="TestCDefSolution.BO" displayName="Invoice Item">
    <property name="InvoiceItemID" type="Guid" readWriteRule="WriteNew" compulsory="true" description="Invoice Item ID descr" keepValuePrivate="true" />
    <property name="InvoiceID" type="Guid" readWriteRule="WriteNew" compulsory="true" />
    <property name="InvoiceItemUk" compulsory="true" />
    <key name="InvoiceItemUk" message="InvoiceItemUk Message" ignoreIfNull="true">
      <prop name="InvoiceItemUk" />
    </key>
    <primaryKey isObjectID="false">
      <prop name="InvoiceItemID" />
    </primaryKey>
    <relationship name="Invoice" type="single" relatedClass="Invoice" reverseRelationship="InvoiceItems" relatedAssembly="TestCDefSolution.BO" deleteAction="DoNothing">
      <relatedProperty property="InvoiceID" relatedProperty="InvoiceID" />
    </relationship>
    <ui name="InvoiceItem">
      <form>
        <columnLayout width="250">
          <field label="InvoiceItemUk" property="InvoiceItemUk" layout="Label" />
        </columnLayout>
      </form>
    </ui>
  </class>
</classes>